<?php
namespace Account\Model\Entity;

class CustomfieldData {

    protected $_id;
    protected $_name;
    protected $_defaultvalue;
	protected $_serializeddata;
	protected $_serializedlabels;

    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
/*
    public function __set($name, $value) {
        $method = 'set' . $name;
        if (!method_exists($this, $method)) {
            throw new Exception('Invalid Method');
        }
        $this->$method($value);
    }

    public function __get($name) {
        $method = 'get' . $name;
        if (!method_exists($this, $method)) {
            throw new Exception('Invalid Method');
        }
        return $this->$method();
    }

    public function setOptions(array $options) {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }
*/
    public function getId() {
        return $this->_id;
    }

    public function setId($id) {
        $this->_id = $id;
        return $this;
    }

    public function getName() {
        return $this->_name;
    }

    public function setName($name) {
        $this->_name = $name;
        return $this;
    }

    public function getDefaultValue() {
        return $this->_defaultvalue;
    }

    public function setDefaultValue($defaultvalue) {
        $this->_defaultvalue = $defaultvalue;
        return $this;
    }
	
	public function getSerializedData() {
        return $this->_serializeddata;
    }

    public function setSerializedData($serializeddata) {
        $this->_serializeddata = $serializeddata;
        return $this;
    }
	
	public function getSerializedLabels() {
        return $this->_serializedlabels;
    }

    public function setSerializedLabels($serializedlabels) {
        $this->_serializedlabels = $serializedlabels;
        return $this;
    }

}
?>